<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>公共云平台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="/EECloud/resource/public/bootstrap/css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="/EECloud/resource/public/bootstrap/css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="/EECloud/resource/css/jquery-ui-redmond/jquery-ui-1.8.21.custom.css">
    <link rel="stylesheet" type="text/css" href="/EECloud/resource/css/global2.css">
    <script type="text/javascript" src="/EECloud/resource/jquery/jquery.js"></script>
    <script src="/EECloud/resource/public/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/EECloud/resource/jquery/jquery-ui-1.8.22.custom.min.js"></script>
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
        /*background-color: #eeeeee;*/
      }
      #reg > li > a{
      padding: 15px 5px;
    }

    .search-box{
      /*border: 1px solid #ddd;*/
      /*background-color: #ddd;*/
      border-collapse: collapse;
      margin: 10px;
      padding: 10px;
      font-size: 13px;
    }
    .search-box td{
      margin: 0px 10px;
      padding: 0px 10px;
    }
    .search-box td a{
      padding:15px;
    }

    .span12 tr{
      text-align: center;
      border-bottom: 1px solid #ddd;
    }
    .span12 td,.span12 th{
      border-right: 1px solid #aaa;
      padding: 1em;
    }
    .span12 td:last-child,.span12 th:last-child{
      border-right: none;
    }
    .resource_head{
      border: 1px solid #ddd;
      background-color: #e5e5e5;
    }
    /*.hero-unit{
      background-color: white;
    }*/
    .container-fluid{
      margin-bottom: 30px;
    }
    </style>
  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="#">公共云平台</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li class="index"><a href="/EECloud/index.php/publicCloud">首页</a></li>
              <li class="resource_display"><a href="/EECloud/index.php/publicCloud/resource_display">资源下载</a></li>
              <li class="new_update"><a href="#contact">最近更新</a></li>
              <li class="notice"><a href="#">重要公告</a></li>
              <li class="help_center"><a href="#">帮助中心</a></li>
            </ul>
            
            <ul class="nav" id="reg" style="float:right;font-size:12px">
            <?php if(empty($userName)): ?>
            <li style="padding: 15px 5px;color:#f00">您还未登录！</li>
            <li style="padding:15px 0px">|</li>
            <li><a href="javascript:void(0);" id="login">登录</a></li>
            <li style="padding:15px 0px">|</li>
            <li><a href="/EECloud/index.php/register">注册</a><li>
            <li style="padding:15px 0px">|</li>
            <!-- <li><a href="">客户端下载</a><li> -->
            <li class="dropdown">
              <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">下载<b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="javascript:void(0);">客户端</a></li>
                <li><a href="/EECloud/index.php/index/evaluate_download">考试评测系统</a></li>
              </ul>
            </li>

          <?php else:?>
          <li style="padding: 15px 5px;color:#f00">欢迎您:</li>
            <li><a href="/EECloud/index.php/userInfo/index" style=""><?=$userName?></a></li>
            <li style="padding:15px 0px">|</li>
            <!-- <li><a href="">客户端下载</a></li> -->
            <li class="dropdown">
              <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">下载<b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="javascript:void(0);">客户端</a></li>
                <li><a href="/EECloud/index.php/index/evaluate_download">考试评测系统</a></li>
              </ul>
            </li>
            <li style="padding:15px 0px">|</li>
            <li><a href="javascript:void(0);" id="logout">退出</a></li>
            <?php endif;?>
          </ul>

          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <script type="text/javascript">
      $(document).ready(function(){
        var url = "<?php echo $url;?>";
        var menu_item = "<?php echo $menu_item;?>";
        $("." + menu_item).addClass('active');
        // alert(url);
        $("#login").click(function(){
          // alert(url);
          window.location.href = "/EECloud/index.php/login?redirect=" + url;
        });

        $("#logout").click(function(){
          window.location.href = "/EECloud/index.php/login/logout?redirect=" + url;;
        });

      });
    </script>
